From b16cada55022282c5b94baaa8571ef2fe9fea51a Mon Sep 17 00:00:00 2001 From: Stevan Earl Date: Sun, 19 Oct 2025 09:11:41 -0700 Subject: [PATCH] docs(erd): show nullability and quoted identifiers across ERDs Updated ERD SVG diagrams (key, follows, events, demography) to: - Annotate nullable columns consistently - Indicate quoted identifiers for clarity where casing or reserved words matter Purpose: improve schema comprehension and downstream tooling that parses diagrams. --- doc/diagrams/demography.svg | 1252 +++++++++--------- doc/diagrams/events.svg | 2280 +++++++++++++++------------------ doc/diagrams/follows.svg | 2366 ++++++++++++++--------------------- doc/diagrams/key.svg | 271 +++- 4 files changed, 2756 insertions(+), 3413 deletions(-) diff --git a/doc/diagrams/demography.svg b/doc/diagrams/demography.svg index 418818f..111af3a 100644 --- a/doc/diagrams/demography.svg +++ b/doc/diagrams/demography.svg @@ -5,7 +5,7 @@ viewBox="0 0 215.9 279.4" version="1.1" id="svg1323" - inkscape:version="1.2.2 (b0a8486541, 2022-12-01)" + inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)" sodipodi:docname="demography.svg" inkscape:export-filename="../../../../../../tmp/demography.png" inkscape:export-xdpi="96" @@ -501,17 +501,17 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.2410847" - inkscape:cx="331.96769" - inkscape:cy="426.64294" + inkscape:cx="352.11135" + inkscape:cy="375.478" inkscape:document-units="mm" inkscape:current-layer="layer3" inkscape:document-rotation="0" showgrid="true" units="in" - inkscape:window-width="1920" - inkscape:window-height="1104" + inkscape:window-width="2048" + inkscape:window-height="1223" inkscape:window-x="0" - inkscape:window-y="31" + inkscape:window-y="28" inkscape:window-maximized="1" inkscape:snap-text-baseline="false" inkscape:snap-global="true" @@ -535,7 +535,9 @@ visible="true" empspacing="2" snapvisiblegridlinesonly="false" - enabled="true" /> + enabled="true" + originx="0" + originy="0" /> in community + CommID + id="g24909" + inkscape:connector-avoid="true" + transform="translate(39.599995,19.71102)"> CommID - - MembCriteria - - - - MembCriteria + + + + COMM_IDS - - + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.82223px;font-family:Sans;-inkscape-font-specification:'Sans, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.264583px">COMM_IDS - - + + + + Name - - - - Name + + + + Notes - - + style="stroke-width:0.264583px">Notes + membership - - - COMM_MEMBS - - - - AnimID - - - - StartDate - - - - EndDate - - - - CommID - - - - StartSource - - - - EndSource - - - - CommMID - - - - - - COMM_MEMB_LOG - - - - DateOfUpdate - - - - AnimID - - - - Description - - - - Rationale - - - - MadeBy * - - - - CommMLID - - - - - - DateOfUpdate - - - - BIOGRAPHY_LOG - - - - AnimID - - - - Description - - - - Rationale - - - - MadeBy * - - - - - BLID - - - - + COMM_MEMBS + + AnimID + + StartDate + + EndDate + + CommID + + StartSource + + EndSource + + CommMID + + COMM_MEMB_LOG + + DateOfUpdate + + AnimID + + Description + + Rationale + + MadeBy * + + CommMLID + + DateOfUpdate + + BIOGRAPHY_LOG + + AnimID + + Description + + Rationale + + MadeBy * + + BLID + + transform="translate(1.7690201,8.910055)"> - - AnimIDNum - - + AnimIDNum + + id="g1665" + transform="translate(0.07537305)"> DadIDPrelim + style="stroke-width:0.264583px">DadStatus + transform="translate(-2.6322291,4.4683952)"> + transform="translate(-2.6417681,4.3632647)"> + + + + + + + + enabled="true" + originx="0" + originy="0" /> Arrivaleventinformation @@ -1087,42 +1089,42 @@ Food eateneventinformation Groomingeventinformation @@ -1145,21 +1147,21 @@ Pantgrunteventinformation @@ -1187,21 +1189,21 @@ Humanseventinformation @@ -1272,21 +1274,21 @@ Matingeventinformation @@ -1309,18 +1311,6 @@ x="142.26556" y="137.68365" inkscape:connector-avoid="true" /> - EID - Species * - OSID - - HUMANS - - EID - - Researchers - - NonResearchers - - HID - - - - ARRIVALS - - HUMANS + + + + + + ARRIVALS + + ArID + style="stroke-width:0.264583px;-inkscape-font-specification:'Sans, Italic';font-family:Sans;font-weight:normal;font-style:italic;font-stretch:normal;font-variant:normal;font-size:2.82223013px;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">ArID + NestStart + + Seq + - NestStart - - - + id="g18164-4" + transform="translate(-48.443651,53.891666)" + inkscape:connector-avoid="true"> Seq + y="92.647041" + style="stroke-width:0.264583px">NestEnd - - - - NestEnd - - + y="90.016411" /> - - DataSource * - - - - EID - - + DataSource * + + EID + + inkscape:connector-curvature="0" /> + transform="matrix(1.0000018,0,0,1.0041489,-11.052594,145.68227)"> GrID + width="30.476858" + height="3.581929" + x="28.719446" + y="201.65796" /> Initiator + width="30.482609" + height="3.3906674" + x="28.716749" + y="216.13655" /> + Duplicate + + ExtractedBy * + + EID + + + PANTGRUNTS + + PgID + + MultiActors + - Duplicate - - - - ExtractedBy * - - - - EID - - - - - PANTGRUNTS - - - PgID - - + id="g18164-4-5-8" + transform="matrix(0.99706922,0,0,0.99706922,65.95514,18.47107)" + inkscape:connector-avoid="true"> MultiActors + y="92.647041" + style="stroke-width:0.264583px">MultiRecipients - - - - MultiRecipients - - + y="90.016411" /> Mutual - - Community - - - - ExtractedBy * - - - - EID - - + width="30.393204" + height="3.3807228" + x="143.14201" + y="111.83183" /> + Community + + ExtractedBy * + + EID + OSID + EID + Species * + HID + EID + Researchers + NonResearchers + + inkscape:connector-curvature="0" /> - - AGGRESSIONS - - + AGGRESSIONS + AgID - - Decided - - - - - MultiAggressors - - - + width="30.387484" + height="3.571425" + x="28.992477" + y="68.542007" /> + Decided + + MultiAggressors + MultiRecipients - - BadObs - - - - Bristle - - - - Display - - - - EID - - + width="30.393215" + height="3.380724" + x="28.989611" + y="82.698029" /> + BadObs + + Bristle + + Display + + EID + Chase - - Vocal - - - - - Severity - - - + width="30.387484" + height="3.571425" + x="28.992477" + y="96.962753" /> + Vocal + + Severity + Community - - ExtractedBy * - - - - Contact - - + width="30.393215" + height="3.380724" + x="28.989611" + y="111.11878" /> + ExtractedBy * + + Contact + - - MATINGS - - + MATINGS + MaID - - Swelling * - - - - - Fail - - - + width="30.387484" + height="3.571425" + x="144.04272" + y="32.354782" /> + Swelling * + + Fail + Interference - - LateInterference - - - - Incest - - - - Consort - - - - EID - - + width="30.393215" + height="3.380724" + x="144.03986" + y="46.510811" /> + LateInterference + + Incest + + Consort + + EID + Guarding - - Camp - - + width="30.387484" + height="3.571425" + x="144.04272" + y="60.775528" /> + Camp + Community - - ExtractedBy * - - - - Courting - - + width="30.393215" + height="3.380724" + x="144.03986" + y="71.564186" /> + ExtractedBy * + + Courting + FOOD_EVENTS + width="30.387484" + height="3.5714288" + x="29.102472" + y="161.10031" /> FEID + width="30.387484" + height="3.571425" + x="29.102472" + y="164.7003" /> FoodPart * + width="30.387918" + height="3.5567253" + x="29.102253" + y="171.94086" /> FoodName * + width="30.387918" + height="3.5567253" + x="29.102253" + y="175.54083" /> FoodPartWritten + width="30.387918" + height="3.5567253" + x="29.102253" + y="179.17363" /> FoodNameWritten + width="30.393215" + height="3.380724" + x="29.099606" + y="182.84454" /> Seq + width="30.393217" + height="3.380724" + x="29.099606" + y="186.27115" /> EVENTS + width="17.638903" + height="3.5355928" + x="29.094748" + y="21.441298" /> EID + style="stroke-width:0.264583px;-inkscape-font-specification:'Sans, Italic';font-family:Sans;font-weight:normal;font-style:italic;font-stretch:normal;font-variant:normal;font-size:2.82223013px;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">EID + width="17.638981" + height="3.5320358" + x="29.094707" + y="25.002615" /> Behavior + width="17.639257" + height="3.519875" + x="29.09457" + y="32.136021" /> FID + style="stroke-width:0.264205px;-inkscape-font-specification:'Sans, Italic';font-family:Sans;font-weight:normal;font-style:italic;font-stretch:normal;font-variant:normal;font-size:2.81820022px;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">FID + width="17.639542" + height="3.5073545" + x="29.094427" + y="28.573626" /> Start + width="17.639462" + height="3.5109012" + x="29.094467" + y="35.682632" /> Notes + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82223013px;font-family:Sans;-inkscape-font-specification:'Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.264583px">Notes + width="17.639257" + height="3.519875" + x="29.09457" + y="46.35606" /> Stop + width="17.639257" + height="3.519875" + x="29.09457" + y="39.294537" /> Certainty + width="17.639462" + height="3.5109012" + x="29.094467" + y="42.862839" /> diff --git a/doc/diagrams/follows.svg b/doc/diagrams/follows.svg index d902806..9211d75 100644 --- a/doc/diagrams/follows.svg +++ b/doc/diagrams/follows.svg @@ -5,35 +5,30 @@ viewBox="0 0 215.9 279.4" version="1.1" id="svg1323" - inkscape:version="1.2.2 (b0a8486541, 2022-12-01)" + inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)" sodipodi:docname="follows.svg" inkscape:export-filename="../../../../../../tmp/demography.png" inkscape:export-xdpi="96" inkscape:export-ydpi="96" + xml:space="preserve" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" - xmlns:dc="http://purl.org/dc/elements/1.1/"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - image/svg+xml - - - - - - - FOLLOW_OBSERVERS - - FOLLOW_OBSERVERS - - individual - individualindividual - individualChildrenof mom - of momChildrenof Dad - of DadObserversconductingthe follow - - FID - - - - Period * - - - - OBS_BRec * - - - - OBS_Tiki * - - - - FOID - - - the followFOLLOW_STUDIES - FOLLOW_STUDIES - - FID - - - - Code * - - - - FSID - - - followed - followedRoles playedas an eventparticipant - participantparticipated - participatedIndividual - IndividualEvent particpatedEvent in whichin - particpatedin an event - in an eventoccurred - occurredduring follow - during followcommunity - communityscheduled - - DadIDPub - - - - BIOGRAPHY_DATA - - - scheduledDadIDPubBIOGRAPHY_DATAAnimID - AnimID - - AnimIDNum - - - - AnimIDNumAnimNameAnimName - BirthComm - - - - BirthComm - - - - BCCertainty - BCCertainty - - Sex - - - - MomID - - - - DadIDPrelim - - - - DadID - - - - FirstBorn - - - - BirthDate - - - - BDMin - - - - BDMax - - - - BDDist - - - - EntryDate - - - - EntryType * - - - - DepartDate - - - - DepartType * - - - SexMomIDDadStatusDadIDFirstBornBirthDateBDMinBDMaxBDDistEntryDateEntryType *DepartDateDepartType * - - - FOLLOWS - FOLLOWS - FID - FID - Community - Community - - Notes - - - - Date - - - NotesDateFocal - FocalFOIDFIDFSIDCode *FIDOBS_Tiki *Period *OBS_Brec * - - - - Follow conductedby the observers - by the observersstudy - studythe follow - - the followCommIDCommID - - MembCriteria - - - - MembCriteriaCOMM_IDS - - - COMM_IDS - - Name - - - - NameNotes - - - - NotesEVENTS - EVENTS - EID - EID - Behavior - Behavior - FID - FID - Start - Start - StopCertainty - - Stop - - Certainty - - - - Notes - Notes - - ROLES - ROLES - PID - PID - Role * - Role * - EID - EID - Participant - Participant - - - - - - - - - - + id="path28075" /> diff --git a/doc/diagrams/key.svg b/doc/diagrams/key.svg index 91af860..578c48d 100644 --- a/doc/diagrams/key.svg +++ b/doc/diagrams/key.svg @@ -5,7 +5,7 @@ viewBox="0 0 140 110" version="1.1" id="svg1323" - inkscape:version="1.2.2 (b0a8486541, 2022-12-01)" + inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)" sodipodi:docname="key.svg" inkscape:export-filename="../../../../../../../tmp/key.png" inkscape:export-xdpi="96" @@ -673,6 +673,63 @@ + + + + + + + + + + transform="matrix(1.1568693,0,0,0.99905934,-21.275811,-30.733858)"> + TABLE_NAME Column_Name Column_Name + Column_Name + Column_Name * + + transform="translate(30.600001,-47.645835)"> TABLE NAME Column Names Relationship Key + y="80.919235">Relationship Key Visual Key + y="13.169698">Visual Key + + + Relationship betweenRelationship betweencolumns of two tables + Indicates a column can be null + Indicates column value doesnot need to be quoted + Indicates column valuesare coded + + id="g264798" + transform="translate(0,3.1750001)">